//对外暴露路由配置(常量路由)
export const constantRoute = [
  {
    //登录
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login', //命名路由
    meta: {
      title: '登录',
      hidden: true,
    },
  },
  {
    //登录成功以后展示数据的路由
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: {
      title: '博客管理项',
      hidden: false,
      icon: 'Grid',
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icon: 'HomeFilled',
        },
      },
    ],
  },
  {
    //留言
    path: '/adminInfo',
    component: () => import('@/layout/index.vue'),
    name: 'adminInfo',
    meta: {
      title: '管理员信息',
      hidden: false,
      icon: 'UserFilled',
    },
    redirect: '/adminInfo/list',
    children: [
      {
        path: '/adminInfo/list',
        component: () => import('@/views/adminInfo/index.vue'),
        name: 'adminInfoList',
        meta: {
          title: '管理员信息管理',
          hidden: false,
          icon: 'UserFilled',
        },
      },
    ],
  },
  {
    //留言
    path: '/webinfo',
    component: () => import('@/layout/index.vue'),
    name: 'webInfo',
    meta: {
      title: '网站信息',
      hidden: false,
      icon: 'ChromeFilled',
    },
    redirect: '/webinfo/list',
    children: [
      {
        path: '/webinfo/list',
        component: () => import('@/views/webInfo/index.vue'),
        name: 'webInfoList',
        meta: {
          title: '网站信息管理',
          hidden: false,
          icon: 'ChromeFilled',
        },
      },
    ],
  },
  {
    //分类
    path: '/category',
    component: () => import('@/layout/index.vue'),
    name: 'category',
    meta: {
      title: '分类管理',
      hidden: false,
      icon: 'List',
    },
    redirect: '/category/list',
    children: [
      {
        path: '/category/list',
        component: () => import('@/views/category/index.vue'),
        name: 'categoryList',
        meta: {
          title: '分类列表',
          hidden: false,
          icon: 'List',
        },
      },
    ],
  },
  {
    //标签
    path: '/tag',
    component: () => import('@/layout/index.vue'),
    name: 'tag',
    meta: {
      title: '标签管理',
      hidden: false,
      icon: 'List',
    },
    redirect: '/tag/list',
    children: [
      {
        path: '/tag/list',
        component: () => import('@/views/tag/index.vue'),
        name: 'tagList',
        meta: {
          title: '标签列表',
          hidden: false,
          icon: 'List',
        },
      },
    ],
  },
  {
    //文章
    path: '/article',
    component: () => import('@/layout/index.vue'),
    name: 'article',
    meta: {
      title: '文章管理',
      hidden: false,
      icon: 'Document',
    },
    redirect: '/article/list',
    children: [
      {
        path: '/article/list',
        component: () => import('@/views/article/list/index.vue'),
        name: 'articleList',
        meta: {
          title: '文章列表',
          hidden: false,
          icon: 'List',
        },
      },
      {
        path: '/article/publish',
        component: () => import('@/views/article/publish/index.vue'),
        name: 'articlePublish',
        meta: {
          title: '发布文章',
          hidden: false,
          icon: 'DocumentAdd',
        },
      },
      {
        path: '/articles/edit/:id',
        component: () => import('@/views/article/edit/index.vue'),
        name: 'editArticle',
        props: true,
        meta: {
          title: '编辑文章',
          hidden: true,
          icon: 'Edit',
        },
      },
    ],
  },
  {
    //留言
    path: '/messageboard',
    component: () => import('@/layout/index.vue'),
    name: 'messageboard',
    meta: {
      title: '留言管理',
      hidden: false,
      icon: 'List',
    },
    redirect: '/messageboard/list',
    children: [
      {
        path: '/messageboard/list',
        component: () => import('@/views/messageboard/index.vue'),
        name: 'messageboardList',
        meta: {
          title: '留言列表',
          hidden: false,
          icon: 'List',
        },
      },
    ],
  },
]
